﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewFundPopUp.aspx.cs" Inherits="FundRaising.GUI.Extensions.NewFundPopUp" MasterPageFile="~/GUI/NewEntityMaster.Master" %>

<asp:Content ID="Content1" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">

        
                             <table style="width: 100%; height: 393px;">
                                 <tr>
                                     <td>
                                         &nbsp;</td>
                                     <td style="width: 485px">
                                         &nbsp;</td>
                                     <td>
                                         &nbsp;</td>
                                 </tr>
                                 <tr>
                                     <td>
                                         &nbsp;</td>
                                     <td style="width: 485px">
                                         &nbsp;</td>
                                     <td dir="rtl">
                                         <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                                             AutoGenerateColumns="False" CellPadding="4" DataKeyNames="FundName" 
                                             DataSourceID="SqlDataSource2" ForeColor="#333333" GridLines="None" 
                                             onselectedindexchanged="GridView1_SelectedIndexChanged" PageSize="4" 
                                             Width="401px">
                                             <RowStyle BackColor="#E3EAEB" />
                                             <Columns>
                                                 <asp:CommandField SelectText="בחר" ShowSelectButton="True" />
                                                 <asp:BoundField DataField="FundName" HeaderText="שם קרן" ReadOnly="True" 
                                                     SortExpression="FundName" />
                                                 <asp:BoundField DataField="FundStatus" HeaderText="סטטוס" 
                                                     SortExpression="FundStatus" />
                                             </Columns>
                                             <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                                             <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
                                             <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
                                             <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                                             <EditRowStyle BackColor="#7C6F57" />
                                             <AlternatingRowStyle BackColor="White" />
                                         </asp:GridView>
                                         <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                                             ConnectionString="<%$ ConnectionStrings:Eden-DatabaseConnectionString3 %>" 
                                             SelectCommand="SELECT * FROM [Fund]"></asp:SqlDataSource>
                                     </td>
                                 </tr>
                                 <tr>
                                     <td>
                                         &nbsp;</td>
                                     <td style="width: 485px">
                                         &nbsp;</td>
                                     <td>
                                         &nbsp;</td>
                                 </tr>
                                 <tr dir="rtl">
                                     <td>
                                         &nbsp;</td>
                                     <td style="width: 485px">
                                         &nbsp;</td>
                                     <td>
                                         <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
                                             BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" 
                                             CellPadding="3" DataKeyNames="FundName" DataSourceID="SqlDataSource1" 
                                             GridLines="Horizontal" Height="50px" Width="293px">
                                             <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                                             <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                                             <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
                                             <Fields>
                                                 <asp:BoundField DataField="FundName" HeaderText="שם קרן" ReadOnly="True" 
                                                     SortExpression="FundName" />
                                                 <asp:TemplateField HeaderText="סטטוס" SortExpression="FundStatus">
                                                     <EditItemTemplate>
                                                         <asp:DropDownList ID="DropDownList2" runat="server" Height="23px" 
                                                             SelectedValue='<%# Bind("FundStatus") %>' Width="129px">
                                                             <asp:ListItem>פעיל</asp:ListItem>
                                                             <asp:ListItem>לא פעיל</asp:ListItem>
                                                         </asp:DropDownList>
                                                     </EditItemTemplate>
                                                     <InsertItemTemplate>
                                                         <br />
                                                         <asp:DropDownList ID="DropDownList1" runat="server" Height="24px" 
                                                             SelectedValue='<%# Bind("FundStatus") %>' Width="128px">
                                                             <asp:ListItem>פעיל</asp:ListItem>
                                                             <asp:ListItem>לא פעיל</asp:ListItem>
                                                         </asp:DropDownList>
                                                     </InsertItemTemplate>
                                                     <ItemTemplate>
                                                         <asp:Label ID="Label1" runat="server" Text='<%# Bind("FundStatus") %>'></asp:Label>
                                                     </ItemTemplate>
                                                 </asp:TemplateField>
                                                 <asp:TemplateField ShowHeader="False">
                                                     <EditItemTemplate>
                                                         <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                                                             CommandName="Update" Text="עדקן"></asp:LinkButton>
                                                         &nbsp;&nbsp; &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                                             CommandName="Cancel" Text="בטל"></asp:LinkButton>
                                                     </EditItemTemplate>
                                                     <InsertItemTemplate>
                                                         <asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="True" 
                                                             CommandName="Insert" Text="הוסף חדש"></asp:LinkButton>
                                                         &nbsp;&nbsp;&nbsp; &nbsp;<asp:LinkButton ID="LinkButton5" runat="server" CausesValidation="False" 
                                                             CommandName="Cancel" Text="בטל"></asp:LinkButton>
                                                     </InsertItemTemplate>
                                                     <ItemTemplate>
                                                         <asp:LinkButton ID="LinkButton6" runat="server" CausesValidation="False" 
                                                             CommandName="Edit" Text="ערוך"></asp:LinkButton>
                                                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:LinkButton ID="LinkButton7" runat="server" CausesValidation="False" 
                                                             CommandName="New" Text="חדש"></asp:LinkButton>
                                                         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False" 
                                                             CommandName="Delete" Text="מחק"></asp:LinkButton>
                                                     </ItemTemplate>
                                                 </asp:TemplateField>
                                             </Fields>
                                             <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                                             <EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                                             <AlternatingRowStyle BackColor="#F7F7F7" />
                                         </asp:DetailsView>
                                         <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                             ConflictDetection="CompareAllValues" 
                                             ConnectionString="<%$ ConnectionStrings:Eden-DatabaseConnectionString3 %>" 
                                             DeleteCommand="DELETE FROM [Fund] WHERE [FundName] = @original_FundName AND (([FundStatus] = @original_FundStatus) OR ([FundStatus] IS NULL AND @original_FundStatus IS NULL))" 
                                             InsertCommand="INSERT INTO [Fund] ([FundName], [FundStatus]) VALUES (@FundName, @FundStatus)" 
                                             OldValuesParameterFormatString="original_{0}" 
                                             SelectCommand="SELECT * FROM [Fund]" 
                                             UpdateCommand="UPDATE [Fund] SET [FundStatus] = @FundStatus WHERE [FundName] = @original_FundName AND (([FundStatus] = @original_FundStatus) OR ([FundStatus] IS NULL AND @original_FundStatus IS NULL))">
                                             <DeleteParameters>
                                                 <asp:Parameter Name="original_FundName" Type="String" />
                                                 <asp:Parameter Name="original_FundStatus" Type="String" />
                                             </DeleteParameters>
                                             <UpdateParameters>
                                                 <asp:Parameter Name="FundStatus" Type="String" />
                                                 <asp:Parameter Name="original_FundName" Type="String" />
                                                 <asp:Parameter Name="original_FundStatus" Type="String" />
                                             </UpdateParameters>
                                             <InsertParameters>
                                                 <asp:Parameter Name="FundName" Type="String" />
                                                 <asp:Parameter Name="FundStatus" Type="String" />
                                             </InsertParameters>
                                         </asp:SqlDataSource>
                                     </td>
                                 </tr>
                                 <tr>
                                     <td>
                                         &nbsp;</td>
                                     <td style="width: 485px">
                                         &nbsp;</td>
                                     <td>
                                         &nbsp;</td>
                                 </tr>
    </table>


</asp:Content>
